/* eslint-disable */
import request from "@/request";

/** cancelOrder POST /api/api/shopPart/order/cancel */
export async function cancelOrderUsingPost(
  body: API.ParamIdRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/shopPart/order/cancel", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** confirmReceive POST /api/api/shopPart/order/confirm */
export async function confirmReceiveUsingPost(
  body: API.Order,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/shopPart/order/confirm", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** createOrder POST /api/api/shopPart/order/create */
export async function createOrderUsingPost(
  body: API.OrderCreateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseOrder_>("/api/api/shopPart/order/create", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** createOrderFromCart POST /api/api/shopPart/order/createFromCart */
export async function createOrderFromCartUsingPost(
  body: API.CartOrderCreateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseOrder_>(
    "/api/api/shopPart/order/createFromCart",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** getOrderDetail POST /api/api/shopPart/order/detail */
export async function getOrderDetailUsingPost(
  body: API.Order,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseOrderDetailVO_>(
    "/api/api/shopPart/order/detail",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** getOrder POST /api/api/shopPart/order/get */
export async function getOrderUsingPost(
  body: API.ParamIdRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseOrder_>("/api/api/shopPart/order/get", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserOrders GET /api/api/shopPart/order/list */
export async function getUserOrdersUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserOrdersUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListOrder_>("/api/api/shopPart/order/list", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** payOrder POST /api/api/shopPart/order/pay */
export async function payOrderUsingPost(
  body: API.Order,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/shopPart/order/pay", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** shipOrder POST /api/api/shopPart/order/ship */
export async function shipOrderUsingPost(
  body: API.Order,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/shopPart/order/ship", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取商户订单列表 POST /api/api/shopPart/order/store/listByStatus */
export async function getStoreOrdersByStatusUsingPost(
  body: API.StoreOrderQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListOrder_>(
    "/api/api/shopPart/order/store/listByStatus",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** getUnshippedOrdersByStore POST /api/api/shopPart/order/store/unshipped */
export async function getUnshippedOrdersByStoreUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUnshippedOrdersByStoreUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListOrder_>(
    "/api/api/shopPart/order/store/unshipped",
    {
      method: "POST",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
